t_timer Struct Reference
struct t_timer The purpose of a timer struct is to get the elspsed time from an event. SDL_GetTicks give the elapsed time from the begin of the application, in the case we want to use it to see if the time in a battle is over, we need to get the time elapsed not from the begin of the application, but from the begin of the battle. So we just create a timer at the begining of the event we want to mesure and then timer_get_ticks will give us the right time with the formulea ticks = SDL_GetTicks () - timer->start_ticks;
More...
#include <timer.h>
Detailed Description
struct t_timer The purpose of a timer struct is to get the elspsed time from an event. SDL_GetTicks give the elapsed time from the begin of the application, in the case we want to use it to see if the time in a battle is over, we need to get the time elapsed not from the begin of the application, but from the begin of the battle. So we just create a timer at the begining of the event we want to mesure and then timer_get_ticks will give us the right time with the formulea ticks = SDL_GetTicks () - timer->start_ticks;
The documentation for this struct was generated from the following file:
- I:/Documents/developpement/projets/C/blast/blastguy_wii_2.2/src/timer.h
Generated on Tue Nov 4 21:07:27 2008 for Blastgu by
1.5.4